package com.cosmo.prototype.demo02;

public class test {
    public static void main(String[] args) throws CloneNotSupportedException {
        WuKong wuKong = new WuKong();
        wuKong.setName("孙悟空");
        wuKong.setStick(new Stick("金箍棒","孙悟空的"));


        WuKong cloneWuKong = wuKong.clone();

        System.out.println("wuKong==cloneWuKong?" + (wuKong == cloneWuKong));//false

        System.out.println("wuKong.getStick()==cloneWuKong.getStick()?" + (cloneWuKong.getStick()==wuKong.getStick()));//false
    }
}
